// import Cookies from 'js-cookie'

// const TokenKey = 'vue_admin_template_token'

// export function getToken() {
//   return Cookies.get(TokenKey)
// }

// export function setToken(token) {
//   return Cookies.set(TokenKey, token)
// }

// export function removeToken() {
//   return Cookies.remove(TokenKey)
// }

// npm install js-cookie --save
import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token' //先设置一个token唯一令牌

const tokentime = 'hrsaas-timestamp'  // 先设置一个时间戳唯一令牌
//获取token
export function getToken() {
  return Cookies.get(TokenKey)
}

//保存token
export function setToken(token) {
  Cookies.set(TokenKey, token)
}

//删除token
export function removeToken() {
  Cookies.remove(TokenKey)
}


//获取时间戳
export function getTimeStamp() {
  return Cookies.get(tokentime)
}

//保存时间戳
export function setTimeStamp() {
  Cookies.set(tokentime, Date.now())
}